package com.sxg.controller;

import com.sxg.annotation.Anonymous;
import com.sxg.service.SxgFileService;
import com.sxg.utils.code.AjaxResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

@RestController
public class SxgFileController {


    @Resource
    private SxgFileService sxgFileService;

    @PostMapping("uploadFile")
    @Anonymous
    public AjaxResult uploadFile(MultipartFile file) {
        return sxgFileService.upload(file);
    }

}
